/*
 * Command.h
 *
 *  Created on: 20 sep 2010
 *      Author: Juan
 */

#ifndef COMMAND_H_
#define COMMAND_H_

#include <string>
#include <vector>
#include <iostream>
using namespace std;

class Command {
private:
	string name;
	vector<string> *arguments;

	string infile;
	string outfile;
	bool append;
public:
	Command(string name);
	virtual ~Command();

	string getName();
	void addArgument( string arg );
	vector<string>* getArguments();

	void setStdInput( string in );
	void setStdOutput( string out );

	void setIORedirectionInput(string in);
	string getIORedirectionInput();
	void setIORedirectionOutput( string out );
	string getIORedirectionOutput();

	void setAppend();
	bool getAppend();

	void exec();

	void print();
};

#endif /* COMMAND_H_ */
